package com.zoweunion.mechanic.service.base.impl;

import com.zoweunion.mechanic.dao.base.MessageRecordDao;
import com.zoweunion.mechanic.service.base.MessageRecordService;
import com.zoweunion.mechanic.util.UuidUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;
import java.util.UUID;

/**
 * @Description:
 * @author: skyxu
 * @date: 2019/1/24 0024 13:27
 * @Copyright: 2019 www.zoweunion.com Inc. All rights reserved.
 */
@Service
@Transactional
public class MessageRecordServiceImpl implements MessageRecordService {


    @Autowired
    private MessageRecordDao messageRecordDao;

    @Override
    public void addMessageRecord(Map<String, Object> reqMap) {
        reqMap.put("id", UuidUtil.get32UUID());

        this.messageRecordDao.addMessageRecord(reqMap);

    }

    @Override
    public List<Map<String, Object>> getRecordList(Map<String, Object> reqMap) {
        return this.messageRecordDao.getRecordList(reqMap);
    }

    @Override
    public List<Map<String, Object>> recordListByReceiveUser(Map<String, Object> reqMap) {
        return this.messageRecordDao.getRecordList(reqMap);
    }


    @Override
    public Map<String, Object> recordNumberByReceiveUser(Map<String, Object> reqMap) {
        return this.messageRecordDao.recordNumberByReceiveUser(reqMap);
    }

    @Override
    public Map<String, Object> getRecordListById(Map<String, Object> reqMap) {
        return this.messageRecordDao.getRecordListById(reqMap);
    }
}
